package ru.spb.osll.myfit.common;

import java.io.Serializable;

public class Range implements Serializable {
  private static final long serialVersionUID = -4258191923531091934L;
  private double m_length;
  private double m_start;

  public Range(double start, double length) {
    m_start = start;
    m_length = length;
  }

  Range() {}

  public double getLength() {
    return m_length;
  }

  public double getStart() {
    return m_start;
  }

//  private final double EPSILON = 0.000001;

//  @Override
//  public boolean equals(Object o) {
//    if (!(o instanceof Range)) {
//      return false;
//    }
//    Range r = (Range) o;
//    return Math.abs(m_start/r.getStart() - 1) < EPSILON && Math.abs(m_length/r.getLength() - 1) < EPSILON;
//  }

//  @Override
//  public int hashCode() {
//    return (length * 31) ^ start;
//  }

//  @Override
//  public String toString() {
//    return "Range(" + m_start + "," + length + ")";
//  }
}

